<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<c:set var="ctx" value="${pageContext.request.contextPath }"></c:set>
<!DOCTYPE html>
<html lang="en">

<c:import url="header.jsp"></c:import>

    <body>

        <div id="wrapper">

            <!-- Navigation -->
            <c:import url="nav.jsp"></c:import>

                <div id="page-wrapper">
                    <div class="container-fluid">
                        <div class="row">
                            <h2 class="title text-center">往期赛事</h2>
                            <a class="btn btn-primary" href="report_edit.html" id="match-add_btn" >添加往期</a>
                            
                            <table class="table table-bordered match-table">
                                <thead>
                                    <tr>
                                        <th>赛事标题</th>
                                        <th>发布日期</th>
                                        <th>操作</th>
                                    </tr>
                                </thead>
                                <tbody>
                                	<c:forEach var="report" items="${reportList}">
	                                    <tr>
		                                        <td scope="row"><a href="#">${report.report_name } </a></td>
		                                        <td>${report.date }</td>
		                                        <td>
		                                            <a href="report_edit.html?report_id=${report.report_id}">修改</a>
		                                            <a href="api_deleteReport?report_id=${report.report_id}">删除</a>
		                                        </td>
	                                    </tr>
                                     </c:forEach>
                                </tbody>
                            </table>
                            
                        </div>
                    </div>
                </div>
                <!-- /#page-wrapper -->
        </div>
        <!-- /#wrapper -->
        <!-- jQuery -->
         <c:import url="footer.jsp"></c:import>
    </body>

</html>